﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using MobileSales.Model.Clients;
using System.ServiceModel.Web;
using System.IO;

namespace MobileSales.Server.RestServices
{
    [ServiceContract]
    public interface IClientServiceREST
    {
        #region Client management
        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare,
                RequestFormat = WebMessageFormat.Json,
                ResponseFormat = WebMessageFormat.Json,
                UriTemplate = "GetClient/{clientId}")]
        Client GetClient(string clientId);
        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare,
                RequestFormat = WebMessageFormat.Json,
                ResponseFormat = WebMessageFormat.Json,
                UriTemplate = "GetClientList")]
        IEnumerable<Client> GetClientList();
        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare,
                RequestFormat = WebMessageFormat.Json,
                ResponseFormat = WebMessageFormat.Json,
                Method = "POST",
                UriTemplate = "StoreClient")]
        void StoreClient(Client client); 
        #endregion

        #region Client group management
        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare,
                RequestFormat = WebMessageFormat.Json,
                ResponseFormat = WebMessageFormat.Json,
                UriTemplate = "GetClientGroup/{clientGroupId}")]
        Model.Clients.ClientGroup GetClientGroup(string clientGroupId);
        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare,
                RequestFormat = WebMessageFormat.Json,
                ResponseFormat = WebMessageFormat.Json,
                UriTemplate = "GetClientGroupList")]
        IEnumerable<Model.Clients.ClientGroup> GetClientGroupList(); 
        #endregion
    }
}
